$(document).ready(function(){

	var questionID ;
	var answer ;
	var ans;
	$(".answerTextarea").hide();
	$(".tijiao").hide();
	$("#questionContent a").each(function(){
		$(this).click(function(){
			$(".answerTextarea").hide();//隐藏文本域
			//$(".answerTextarea").val()=null;
			$(".tijiao").hide();//隐藏按钮
			var id = $(this).attr("id"); 
			//alert(id);
			ans = "answerTextarea"+id;
			var tj = "tijiao"+id;
			$("#"+ans).show();//显示文本域
			$("#"+tj).show();//显示按钮
			questionID = id;
			
		});
	});
	
	$(".tijiao").click(function(){
		$(".answerTextarea").hide();
		$(".tijiao").hide();
		answer = $("#"+ans).val();
		//alert(answer);
		$("#content").load("/Test/ansQuestion.action?questionID="+questionID+"&answer="+answer);
	});
	
});